<!doctype html>
<html>
{include file="head.html"}

<body>
<script>
var qsjia={$shop.qsjia};
</script>
<div class="fullscreen">
  <div class="xscroll_content">
    <div class="topfixed">
      <div class="t_left"><a class="goBack" href="/index.php"><i class="back"></i></a></div>
      <div class="t_main">校园超市</div>
      
    </div>
    <div class="paddingheight"></div>
    <div class="market_wrap" style="width:100%"> {get data=cat model=koudai_category fun=children(array("where"=>" status=2 AND shopid=$shop[id]"))}
      {get data=cart model=koudai_order_cart fun=getListByUser()}
      <div class="leftbox">
        <ul class="comsort">
          {foreach item=c from=$cat}
          <li {if get('catid') eq $c.id}class="cur"{/if}><a href="/index.php?m=koudai&catid={$c.id}">{$c.title}</a></li>
          {/foreach}
        </ul>
      </div>
      
      <div class="rightboxx" style=" position:relative; float:right; width:80%;">
        <div class="flexslider">
         {get data=ad1 model=ad fun=listbyno("wap_koudai_flash")}
          <ul class="slides clearfix">
          {foreach item=c from=$ad1}
            <li><a href="{$c.link1}"><img class="img lazy" url="{$c.imgurl|images_site}" width="100%"></a> </li>
          {/foreach}  
           
          </ul>
        </div>
         
        
        
        <div class="market_tabs_wrap clearfix">
          <div class="market_tabs clearfix fl">
            <div class="first_item"> <a href="{$baseurl}" {if get('orderby') eq ''} style=" color: #F74335;"{/if} >默认</a> </div>
            <ul class="last_item">
              <li class="b3"><a href="{$baseurl}&orderby=price&index={if get('orderby') eq 'price' && get('index') eq 'asc'}desc{else}asc{/if}" class="{if get('orderby') eq 'price'}cur{/if}">价格</a></li>
              <li class="b2"><i class="ico top  {if get('index') eq 'asc'}cur{/if}"></i><br>
                <i class="ico bot {if get('index') eq 'desc'}cur{/if}"></i></li>
              <li class="b1"><a href="{$baseurl}&orderby=buy_num&index={if get('orderby') eq 'buy_num' && get('index') eq 'desc'}asc{else}desc{/if}" class="{if get('orderby') eq 'buy_num'}cur{/if}">销售</a></li>
            </ul>
          </div>
        </div>
        
        <ul class="market_list clearfix">
          {foreach item=c from=$prolist}
          <li class="clearfix">
            <div class="fl"><img url="{$c.imgurl|images_site}.small.jpg" class="img lazy"></div>
            <div class="fr">
              <p class="tit">{$c.title}</p>
              <p class="tags"><i class="global_icon red">保</i></p>
              <div class="num"><span class="f_left"><del>￥{$c.market_price}</del></span><span class="f_right">已售{$c.buy_num}份</span></div>
              <div class="pricebox">
                <p class="price">￥<b class="red">{if $c.lower_price>0}{$c.lower_price}{else}{$c.price}{/if}</b></p>
                <div class="showcart"> {if $c.total_num eq 0}已售罄{else}
                  <div class="cart_icon {if $cart[product][$c[id]]}none{/if}"></div>
                  <div class="cart_num" {if $cart[product][$c[id]]} style="display:block;"{/if} object_id="{$c.id}" shopid="{$c.shopid}" productid="{$c.productid}"> 
                    <a class="Decrease" href="javascript:void(0)"><i>-</i></a>
                    <input class="Amount" value="{$cart[product][$c[id]][amount]|intval}" autocomplete="off" maxlength="3">
                    <a class="Increase" href="javascript:void(0)"><i>+</i></a>  
                  </div>{/if}
                </div>
              </div>
             
            </div>
          </li>
          {/foreach}
        </ul>
        {$pagelist}
        <div class="clearfix"></div>
        {include file="footer.html"} </div>
    </div>
  </div>
</div>
<script src="{$skins}js/koudai_cart.js"></script> 
<script>
  imgLazy("body");
loadjs(basejs,function(){
		 $(".flexslider").flexslider();
}) 
 $(".showcart .cart_icon").click(function(e) {
    $(this).fadeOut(10).next(".cart_num").fadeIn("fast");
	$(this).parents(".showcart").find(".Increase").trigger("click");
});

  </script> 
 {assign var="botnav" value="koudai"} 
<script src="/index.php?m=stat_view_day&a=add&shopid={$shop.id}&k=koudai"></script> 
{include file="botnav.html"}
</body>
</html>
